import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;

/**
 * Created by 14229 on 2020/2/21.
 */
public class Test03 {
    public static void main(String[] args) throws IOException {

        readFile();
    }
    public static String readFile() throws IOException {
        File file = new File("模拟D盘/a.txt");
        file.createNewFile();

        FileUtils.writeStringToFile(file,"我是中国人");
        String s = FileUtils.readFileToString(file,"UTF-8");
        System.out.println(s);
        return s;

    }
}
